<template>
  <div class="header" :style="{ backgroundImage: `url(${sellerInfo.avatar})` }">
    <div class="MaskTitle">
      <div class="top">
        <img :src="sellerInfo.avatar" alt="">
        <div>
          <p>{{ sellerInfo.name }}</p>
          <p>蜂鸟专送 / 38分钟送达</p>
          <p>在线支付满28减5，满50减10</p>
        </div>
        <p class="five">
          <span>5个</span>
          <span>&gt;</span>
        </p>
      </div>
      <div class="tip">
        <p>{{ sellerInfo.bulletin }}</p>
        <span>&gt;</span>
      </div>
    </div>
  </div>
</template>

<script>
import { mapActions, mapState } from 'vuex';
export default {
  data() {
    return {

    }
  },
  created() {
    this.getSeller();
  },
  computed: {
    ...mapState(["sellerInfo"]),
  },
  methods: {
    ...mapActions(["getSeller", "getGoods"]),
  }
}
</script>

<style scoped>
.header {
  height: 134px;
  background-repeat: no-repeat;
  background-size: cover;
  position: relative;
}

.MaskTitle {
  width: 100%;
  height: 134px;
  background: rgba(7, 17, 27, 0.5);
  backdrop-filter: blur(10px);
  position: absolute;
  left: 0;
  top: 0;
}

.top {
  height: 106px;
  display: flex;
  padding-top: 24px;
  padding-left: 24px;
  position: relative;
}

.top>div {
  margin-left: 16px;
}

.top>div>p:nth-child(1) {
  font-size: 16px;
  color: rgb(255, 255, 255);
  font-weight: bold;
  line-height: 18px;
  margin-top: 2px;
}

.top>div>p:nth-child(2) {
  font-size: 12px;
  color: rgb(255, 255, 255);
  font-weight: 200;
  line-height: 12px;
  margin-top: 6px;
  margin-bottom: 8px;
}

.top>div>p:nth-child(3) {
  font-size: 10px;
  color: rgb(255, 255, 255);
  font-weight: 200;
}

.top>div>p:nth-child(1)::before {
  content: "品牌";
  color: white;
  background: red;
  font-size: 12px;
  font-weight: bold;
  margin-right: 6px;
  padding: 2px 4px;
}

.top>div>p:nth-child(3)::before {
  content: '减';
  background: white;
  color: salmon;
  margin-right: 4px;
  padding: 0px 2px;
  font-size: 8px;
}

.five {
  width: 36px;
  height: 20px;
  font-size: 10px;
  background-color: rgba(0, 0, 0, 0.2);
  color: rgb(255, 255, 255);
  font-weight: 200;
  border-radius: 20px;
  justify-content: center;
  align-items: center;
  display: flex;
  padding: 4px 6px;
  position: absolute;
  bottom: 38px;
  right: 12px;
}

.five>span:nth-child(1) {
  margin-right: 3px;
}

.tip {
  height: 28px;
  width: 100%;
  font-size: 10px;
  color: #fff;
  padding-left: 12px;
  background: rgba(7, 17, 27, 0.2);
  display: flex;
  align-items: center;
  position: absolute;
  bottom: 0;
}
.tip>p{
  width: 85%;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}
.tip>p::before {
  content: "公告";
  background-color: #fff;
  color: gray;
  margin-right: 4px;
  padding: 2px 3px;
  font-weight: bold;
}

img {
  display: block;
  width: 64px;
  height: 64px;
}
</style>